#include "BaseCamera.h"
#include "../Header/Globals.h"

#define FOV			45.0f
#define ASPECTRATIO	Globals::m_iScreenWidth / Globals::m_iScreenHeight
#define NEAR		1.0f
#define FAR			1500.0f

BaseCamera::BaseCamera()
:m_fRotX(0), m_fRotY(0), m_fRotZ(0),
m_v3Position(Vector3(0.0f, 0.0f, 0.0f)),
m_bIsChanged(false)
{
	m_maLocalM.SetIdentity();
	m_maProjection.SetIdentity().SetPerspective(FOV, ASPECTRATIO, NEAR, FAR);
}

BaseCamera::~BaseCamera()
{

}

__VOID BaseCamera::SetPosition(__FLOAT x, __FLOAT y, __FLOAT z)
{
	m_v3Position = Vector3(x, y, z);
	m_bIsChanged = true;
}

__VOID BaseCamera::SetRotation(__FLOAT x, __FLOAT y, __FLOAT z)
{
	m_fRotX = x;
	m_fRotY = y;
	m_fRotZ = z;
	m_bIsChanged = true;
}